package com.assessment.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.assessment.entity.Comprehensive;
import com.assessment.service.ComprehensiveService;

@Controller
@RequestMapping("/comprehensive")
public class ComprehensiveController {

	@Resource
	private ComprehensiveService comprehensiveService;
	
	@RequestMapping("/getCom.do")
	public String getComprehensive(Model model){
		System.out.println("dsds");
		System.out.println(this.comprehensiveService.getCom());
		model.addAttribute("comprehensive",this.comprehensiveService.getCom());
		return "comprehensive/comprehensive";
	}
	
	@RequestMapping("/addCom.do")
	public void addCom(Comprehensive comprehensive){
		comprehensiveService.addCom(comprehensive);
	}
}
